package com.cndw.kungfu.domain;

import com.cndw.kungfu.model.queue.QueueHandler;
import com.cndw.kungfu.vo.QueueVO;

/**
 * 数据表的队列对象
 * @author fantadust [9677889@qq.com]
 * @date 2011-8-24 下午6:47:52
 */
public class Queue {
	/**
	 * 编号
	 */
	private int id;
	/**
	 * 角色id
	 */
	private long playerId;
	/**
	 * 类型
	 */
	private int type;
	/**
	 * 执行函数
	 */
	private int funcType;
	/**
	 * 开始时间
	 */
	private int beginTime;
	/**
	 * 结束时间
	 */
	private int endTime;
	/**
	 * 状态
	 */
	private int status;
	/**
	 * 队列参数
	 */
	private int param1,param2;
	private String param3;
	/**
	 * 参数
	 */
	private String params;
	/**
	 * 执行间隔
	 */
	private int intervalTime;
	/**
	 * 下次执行时间
	 */
	private int nextExecTime;
	/**
	 * 当前执行时间
	 */
	private int lastExecTime;
	/**
	 * 执行次数
	 */
	private int execNum;
	/**
	 * 内容
	 */
	private String title;
	/**
	 * 描述
	 */
	private String content;
	/**
	 * 准备就绪
	 */
	public static final int statusOnReady = 0 ;
	/**
	 * 启动队列
	 */
	public static final int statusOnStart = 1 ;
	/**
	 * 执行中,针对部分需要循环执行的
	 */
	public static final int statusOnRun   = 2 ;
	/**
	 * 已终结
	 */
	public static final int statusOnEnd   = 4 ;
	
	private QueueHandler queueHandler; 
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public long getPlayerId() {
		return playerId;
	}
	public void setPlayerId(long playerId) {
		this.playerId = playerId;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public int getFuncType() {
		return funcType;
	}
	public void setFuncType(int funcType) {
		this.funcType = funcType;
	}
	public int getBeginTime() {
		return beginTime;
	}
	public void setBeginTime(int beginTime) {
		this.beginTime = beginTime;
	}
	public int getEndTime() {
		return endTime;
	}
	public void setEndTime(int endTime) {
		this.endTime = endTime;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}	
	public int getParam1() {
		return param1;
	}
	public void setParam1(int param1) {
		this.param1 = param1;
	}
	public int getParam2() {
		return param2;
	}
	public void setParam2(int param2) {
		this.param2 = param2;
	}
	public String getParam3() {
		return param3;
	}
	public void setParam3(String param3) {
		this.param3 = param3;
	}
	public String getParams() {
		return params;
	}
	public void setParams(String params) {
		this.params = params;
	}
	public int getNextExecTime() {
		return nextExecTime;
	}
	public void setNextExecTime(int nextExecTime) {
		this.nextExecTime = nextExecTime;
	}
	public int getExecNum() {
		return execNum;
	}
	public void setExecNum(int execNum) {
		this.execNum = execNum;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}	
	public int getIntervalTime() {
		return intervalTime;
	}
	public int getLastExecTime() {
		return lastExecTime;
	}
	public void setIntervalTime(int intervalTime) {
		this.intervalTime = intervalTime;
	}
	public void setLastExecTime(int lastExecTime) {
		this.lastExecTime = lastExecTime;
	}
	
	public QueueHandler getQueueHandler() {
		return queueHandler;
	}
	public void setQueueHandler(QueueHandler queueHandler) {
		this.queueHandler = queueHandler;
	}
	public QueueVO toQueueVO(){
		return new QueueVO(this);
	}
}
